]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensions-tool: Use g_strcmp0() for NULL-safety
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 25 Apr 2026 01:22:03 +0000 (03:22 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 2 Aug 2026 16:48:19 +0000 (18:48 +0200)
While the argument cannot actually be NULL here (check in caller),
this isn't easily detected by tooling.

Spotted by gobject-linter: use_g_strcmp0

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4193>
(cherry picked from commit cc9735f968df2e0048869813d95e6a108cc6814b)

subprojects/extensions-tool/src/command-upload.c

index 2ead25f16f48214db89e28ef4f915bef2be4383e..60446f342db6427c3011eef76e6a5f779a377543 100644 (file)
@@ -174,7 +174,7 @@ read_password_file (const char  *filename,
   g_autoptr (GDataInputStream) istream = NULL;
   char *line = NULL;
 
-  if (strcmp (filename, "-") == 0)
+  if (g_strcmp0 (filename, "-") == 0)
     {
       g_autoptr (GInputStream) stdin = NULL;